package com.freeme.camera.data;

public class PictureSizeInfo {

	public int width;
	public int height;

	private long mExpectOutImageSize = 0;

	private long mDefaultOutImageSize = 4 * 1024 * 1024;

	private double mExpectScreenRatio = 4d / 3;

	public double getExpectScreenRatio() {
		return mExpectScreenRatio;
	}

	public void setExpectScreenRatio(double mExpectScreenRatio) {
		this.mExpectScreenRatio = mExpectScreenRatio;
	}

	public PictureSizeInfo(int w, int h) {
		width = w;
		height = h;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof Size)) {
			return false;
		}
		Size s = (Size) obj;
		return width == s.width && height == s.height;
	}

	public long getExpecttOutImageSize() {
		if (mExpectOutImageSize == 0) {
			return mDefaultOutImageSize;
		}
		return mExpectOutImageSize;
	}

	public void setExpectOutImageSize(long mPerfectOutImageSize) {
		this.mExpectOutImageSize = mPerfectOutImageSize;
	}

	@Override
	public int hashCode() {
		return width * 32713 + height;
	}
	
	@Override
	public String toString() {
		return "PictureSizeInfo [width=" + width + ", height=" + height
				+ ", mExpectOutImageSize=" + mExpectOutImageSize
				+ ", mDefaultOutImageSize=" + mDefaultOutImageSize
				+ ", mExpectScreenRatio=" + mExpectScreenRatio + "]";
	}
}
